package com.example.messagemodule.adapter;

import android.widget.ImageView;

import androidx.annotation.Nullable;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.example.messagemodule.R;
import com.example.messagemodule.entity.DoctorWorkTabEntity;

import java.util.List;

/**
 * Created by SHICHENG
 * <p>
 * Time on
 */
public class InquiryHintAdapter extends BaseQuickAdapter<DoctorWorkTabEntity.DataBean, BaseViewHolder> {

    public InquiryHintAdapter(int layoutResId, @Nullable List<DoctorWorkTabEntity.DataBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, DoctorWorkTabEntity.DataBean item) {
        Glide.with(mContext).load(item.isEnable()?item.getSelectIcon():item.getUnSelectIcon()).into((ImageView) helper.getView(R.id.item_inquiry_hint_icon));
        helper.setText(R.id.item_inquiry_hint_name,item.getTabName());
        helper.setText(R.id.item_inquiry_hint_subname,item.getTabSubName());
    }
}
